package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GuiQueryRecordMapper;
import com.ruoyi.system.domain.GuiQueryRecord;
import com.ruoyi.system.service.IGuiQueryRecordService;

/**
 * 查询记录Service业务层处理
 * 
 * @author wuhegui
 * @date 2024-01-06
 */
@Service
public class GuiQueryRecordServiceImpl implements IGuiQueryRecordService 
{
    @Autowired
    private GuiQueryRecordMapper guiQueryRecordMapper;

    /**
     * 查询查询记录
     * 
     * @param id 查询记录主键
     * @return 查询记录
     */
    @Override
    public GuiQueryRecord selectGuiQueryRecordById(Long id)
    {
        return guiQueryRecordMapper.selectGuiQueryRecordById(id);
    }

    /**
     * 查询查询记录列表
     * 
     * @param guiQueryRecord 查询记录
     * @return 查询记录
     */
    @Override
    public List<GuiQueryRecord> selectGuiQueryRecordList(GuiQueryRecord guiQueryRecord)
    {
        return guiQueryRecordMapper.selectGuiQueryRecordList(guiQueryRecord);
    }

    /**
     * 新增查询记录
     * 
     * @param guiQueryRecord 查询记录
     * @return 结果
     */
    @Override
    public int insertGuiQueryRecord(GuiQueryRecord guiQueryRecord)
    {
        guiQueryRecord.setCreateTime(DateUtils.getNowDate());
        return guiQueryRecordMapper.insertGuiQueryRecord(guiQueryRecord);
    }

    /**
     * 修改查询记录
     * 
     * @param guiQueryRecord 查询记录
     * @return 结果
     */
    @Override
    public int updateGuiQueryRecord(GuiQueryRecord guiQueryRecord)
    {
        guiQueryRecord.setUpdateTime(DateUtils.getNowDate());
        return guiQueryRecordMapper.updateGuiQueryRecord(guiQueryRecord);
    }

    /**
     * 批量删除查询记录
     * 
     * @param ids 需要删除的查询记录主键
     * @return 结果
     */
    @Override
    public int deleteGuiQueryRecordByIds(Long[] ids)
    {
        return guiQueryRecordMapper.deleteGuiQueryRecordByIds(ids);
    }

    /**
     * 删除查询记录信息
     * 
     * @param id 查询记录主键
     * @return 结果
     */
    @Override
    public int deleteGuiQueryRecordById(Long id)
    {
        return guiQueryRecordMapper.deleteGuiQueryRecordById(id);
    }
}
